void Fight::fightProcedure()	{
	//Decide the creature's general area
	int creatureType = InitializeObject.randomNumber(0, 4);
	if(creatureType == 4)	{
		creatureType = InitializeObject.area;
	}

	//Decide what the creature is in the area chosen if it's not a Dragon
	if (creatureType != 0)	{
		creatureType = InitializeObject.randomNumber(creatureType * 3 - 2, creatureType * 3);
	}
	//Assign the creature stats
	//CreaturesObject.creatureAssigner(creatureType);
	CreaturesObject.creatureAssigner(0);

	//Go through the fight menu as long as both are alive, and you haven't escaped
	while (PlayerObject.Health > 0 && CreaturesObject.CreatureHealth > 0 && PlayerObject.run == false)	{
		FightObject.fightMenu();
	}
}

void Fight::fightMenu()	{
	InitializeObject.choice = NULL;

	cout << "1.Attack\n";
	cout << "2.Magic\n";
	cout << "3.Items\n";
	cout << "4.Run\n" << endl;

	while (InitializeObject.choice == NULL)	{
		cin >> InitializeObject.choice;
		switch (InitializeObject.choice)	{
			case 061:
				FightObject.fightAlgorithm();
				break;
			case 062:
				FightObject.magicMenu();
				break;
			case 063:
				AttributesObject.Inventory();
				break;
			case 064:
				if (InitializeObject.randomNumber(0, 3) == 1)	{
					cout << "You manage to escape\n" << endl;
					PlayerObject.run = true;
				}
				else cout << "You fail to escape\n" << endl;
				break;
			default:
				cout << "Invalid character\n" << endl;
				InitializeObject.choice = NULL;
		}
	}
}

void Fight::fightAlgorithm()	{
	//Player Damage Done
	cout << "You attack the " << CreaturesObject.CreatureDescription << endl;
	//Determine the damage, based on the opponent's defence and player's strength
	PlayerObject.Damage = PlayerObject.Strength;
	//Determine if you hit, based on the opponent's agility, and player's accuracy
	if (InitializeObject.randomNumber(0, CreaturesObject.CreatureAgility) < PlayerObject.Accuracy)	{
		cout << "The creature dodged your attack\n" << endl;
		PlayerObject.Damage = 0;
	}
	else cout << "You did " << PlayerObject.Damage << " points of damage to the " << CreaturesObject.CreatureDescription << endl;
	CreaturesObject.CreatureHealth -= PlayerObject.Damage;

	if (CreaturesObject.CreatureHealth > 0)	{
		//Creature Damage Done
		cout << "The " << CreaturesObject.CreatureDescription << " attacks you" << endl;
		//Creature damage, based on strength and player's defence
		CreaturesObject.CreatureDamage = CreaturesObject.CreatureStrength;
		//if the creature hits or not
		if (InitializeObject.randomNumber(0, PlayerObject.Agility) < CreaturesObject.CreatureAccuracy)	{
			cout << "You dodge the creature's attack\n" << endl;
			CreaturesObject.CreatureDamage = 0;
		}
		else cout << "The creature did " << CreaturesObject.CreatureDamage << " points of damage to you\n" << endl;
		PlayerObject.Health -= CreaturesObject.CreatureDamage;
	}
	cout << "Player's Health = " << PlayerObject.Health << endl;
	cout << CreaturesObject.CreatureDescription << "'s Health = " << CreaturesObject.CreatureHealth << endl;

}

void Fight:: magicMenu()	{
	cout << "You throw a ball of power at the " << CreaturesObject.CreatureDescription << endl;
	PlayerObject.Damage = PlayerObject.Magic * 3 - CreaturesObject.CreatureMagic;
}